package demo3;

public class Test {
    public String name;
    public int age;
    public static String classRoom = "广学楼";
    public Test(){
        System.out.println("无参构造方法");
    }
    static {
        System.out.println("静态代码块");
    }
    public Test(String name,int age){
        this.name = name;
        this.age = age;
        System.out.println("带有两个参数的构造方法");
    }
    public static void show(){
        {
            System.out.println("普通代码块");
        }
    }
    {
        name = "张飞";
        System.out.println("非静态代码块、实例代码块、构造代码块");
    }
    public static void main(String[] args) {
        show();
    }
}
